


#include <type_traits>
#include <variant>
#include <string>
#include <functional>

#include "catch.hpp"

template<class T>
void f(T t)
{
	if constexpr(std::is_invocable_r_v<void, T, std::variant<std::string>>)
	{
		static_assert(std::is_invocable_r_v<void, T, std::variant<std::string>>);
		std::function<void(std::variant<std::string>)> ffff = t;
	}
	else
	{
		CHECK(false);
	}
}

TEST_CASE("vs_bugs:cannot convert from lambda to std::function< std::variant  > ")
{
	f([](std::variant<std::string>){});
}